﻿<Window
    x:Class="MultipleQuiks.MainWindow"
    xmlns="http://schemas.microsoft.com/winfx/2006/xaml/presentation"
    xmlns:x="http://schemas.microsoft.com/winfx/2006/xaml"
    xmlns:d="http://schemas.microsoft.com/expression/blend/2008"
    xmlns:local="clr-namespace:MultipleQuiks"
    xmlns:mc="http://schemas.openxmlformats.org/markup-compatibility/2006"
    xmlns:viewmodels="clr-namespace:MultipleQuiks.ViewModels"
    Title="MainWindow"
    Width="800"
    Height="450"
    d:DataContext="{d:DesignInstance Type=viewmodels:MainViewModel}"
    mc:Ignorable="d">
    <Grid>
        <Grid.ColumnDefinitions>
            <ColumnDefinition Width="*" />
        </Grid.ColumnDefinitions>

        <Grid.RowDefinitions>
            <RowDefinition Height="Auto" />
            <RowDefinition Height="*" />
        </Grid.RowDefinitions>

        <Button
            Grid.Row="0"
            Grid.Column="0"
            Command="{Binding AddQuikCommand}"
            Content="AddQuik" />

        <ListView
            Grid.Row="1"
            d:ItemsSource="{d:SampleData ItemCount=5}"
            ItemsSource="{Binding QuikViewModels}">
            <ListView.View>
                <GridView AllowsColumnReorder="True">
                    <GridViewColumn
                        Width="400"
                        DisplayMemberBinding="{Binding QuikPath}"
                        Header="Name" />
                    <GridViewColumn Width="100" Header="Connect">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <Button Command="{Binding ConnectCommand}" Content="Connect" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>

                    <GridViewColumn
                        Width="100"
                        DisplayMemberBinding="{Binding IsConnected}"
                        Header="Connected" />
                    <GridViewColumn
                        Width="100"
                        DisplayMemberBinding="{Binding IsDLLConneted}"
                        Header="DLLConnected">
                        <GridViewColumn.CellTemplate>
                            <DataTemplate>
                                <CheckBox Content="wdwdwd" IsChecked="{Binding IsDLLConneted}" />
                            </DataTemplate>
                        </GridViewColumn.CellTemplate>
                    </GridViewColumn>
                </GridView>
            </ListView.View>
        </ListView>
    </Grid>
</Window>
